package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallActivitySource;
import com.appkubes.mall.core.po.MallActivitySourceExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallActivitySourceMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_activity_source
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallActivitySourceSqlProvider.class, method="countByExample")
    long countByExample(MallActivitySourceExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_activity_source
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallActivitySourceSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallActivitySourceExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_activity_source
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_activity_source",
        "where activity_key = #{activityKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String activityKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_activity_source
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_activity_source (activity_key, app_key, ",
        "source_tpe, source_key)",
        "values (#{activityKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{sourceTpe,jdbcType=VARCHAR}, #{sourceKey,jdbcType=VARCHAR})"
    })
    int insert(MallActivitySource record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_activity_source
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallActivitySourceSqlProvider.class, method="insertSelective")
    int insertSelective(MallActivitySource record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_activity_source
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallActivitySourceSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="activity_key", property="activityKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="source_tpe", property="sourceTpe", jdbcType=JdbcType.VARCHAR),
        @Result(column="source_key", property="sourceKey", jdbcType=JdbcType.VARCHAR)
    })
    List<MallActivitySource> selectByExampleWithRowbounds(MallActivitySourceExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_activity_source
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallActivitySourceSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="activity_key", property="activityKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="source_tpe", property="sourceTpe", jdbcType=JdbcType.VARCHAR),
        @Result(column="source_key", property="sourceKey", jdbcType=JdbcType.VARCHAR)
    })
    List<MallActivitySource> selectByExample(MallActivitySourceExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_activity_source
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "activity_key, app_key, source_tpe, source_key",
        "from mall_activity_source",
        "where activity_key = #{activityKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="activity_key", property="activityKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="source_tpe", property="sourceTpe", jdbcType=JdbcType.VARCHAR),
        @Result(column="source_key", property="sourceKey", jdbcType=JdbcType.VARCHAR)
    })
    MallActivitySource selectByPrimaryKey(String activityKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_activity_source
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallActivitySourceSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallActivitySource record, @Param("example") MallActivitySourceExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_activity_source
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallActivitySourceSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallActivitySource record, @Param("example") MallActivitySourceExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_activity_source
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallActivitySourceSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallActivitySource record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_activity_source
     *
     * @mbg.generated
     */
    @Update({
        "update mall_activity_source",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "source_tpe = #{sourceTpe,jdbcType=VARCHAR},",
          "source_key = #{sourceKey,jdbcType=VARCHAR}",
        "where activity_key = #{activityKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallActivitySource record);
}